package rabbit_zap

import "fmt"

type LoggerCollectorConfig struct {
	Amqp Amqp `mapstructure:"amqp"`
}

// mq配置
type Amqp struct {
	Host     string
	Port     int
	Username string
	Password string
	Vhost    string
	Exchange string
}

func (a *Amqp) GetUrl() string {
	return fmt.Sprintf("amqp://%s:%s@%s:%d/%s", a.Username, a.Password, a.Host, a.Port, a.Vhost)
}
